﻿@model IEnumerable<L2C.Publishing_Item>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table width="100%">
    <tr>
        <th>
            Product
        </th>
        <th style="width:150px;">
            Title
        </th>
       
        <th>
            Descriptions
        </th>
        <th>
            ViewerCounter
        </th>
        <th>
            SellPrice
        </th>
        <th>
            DiscountPercent
        </th>
        <th>
            Product_Price
        </th>
        <th>
            StartDate
        </th>
        <th>
            EndDate
        </th>
        <th>
            BuyerCounter
        </th>
        <th>
            MaximumQuanlity
        </th>
        <th>
            Category_Item
        </th>
        <th>
            SmallPicture
        </th>
        <th>
            ShortTitle
        </th>
       
        
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Product.Product_Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>        
        <td>
            @Html.DisplayFor(modelItem => item.Descriptions)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ViewerCounter)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SellPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DiscountPercent)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Product_Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.StartDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.BuyerCounter)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MaximumQuantity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Category_Item.Category_Name)
        </td>
        <td>
            <img src="@Html.DisplayFor(modelItem => item.SmallPicture)" style="width: 70px; height:50px" />
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShortTitle)
        </td>      
        
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Item_Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Item_Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Item_Id })
        </td>
    </tr>
}

</table>
